/**
 * 本地存储管理
 */
export default class LocalStorageManager {
    public static setItem(key: string, obj: any) {
        cc.sys.localStorage.setItem(key, JSON.stringify(obj));
        // console.log("LocalStorage set " + key + " " +  JSON.stringify(obj));
    }

    public static getItem(key: string): any {
        let item = cc.sys.localStorage.getItem(key);
        if (item) {
            return JSON.parse(item);
        }
        return
    }

    public static removeItem(key: string) {
        cc.sys.localStorage.removeItem(key);
    }

}